package com.zzx.demo.service.impl;

import java.util.List;
import java.util.Map;

import com.zzx.demo.dao.BaseDaoImpl;
import com.zzx.demo.dao.DynamicDataSourceHolder;
import com.zzx.demo.service.ITestService;

public class TestServiceImpl implements ITestService{
	private BaseDaoImpl baseDao;// 用户中心操作的dao
	
	
	public BaseDaoImpl getBaseDao() {
		return baseDao;
	}


	public void setBaseDao(BaseDaoImpl baseDao) {
		this.baseDao = baseDao;
	}


	@Override
	public void queryUserList(Map<String, String> map) {
		System.err.println("**********数据库访问开始***********");
		DynamicDataSourceHolder.putDataSource("master");
		List<Map<String,String>> list = baseDao.queryForList("userMapper.queryUserList", map);
		System.err.println("**********数据库访问结束*********"+list.toString());
	}
	
}
